﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;

namespace Colaboradores.Persistencia
{
    public class Conexao
    {
        private static SqlConnection oCnx;

        public static String ConnectionString
        {
            get { return @"Data Source=DANIEL-NETBOOK\SQLEXPRESS;Initial Catalog=BaseColaboradores;Integrated Security=True;Pooling=False"; }
        }

        public static SqlConnection getInstancia()
        {
            if (oCnx == null)
            {
                oCnx = new SqlConnection(@"Data Source=DANIEL-NETBOOK\SQLEXPRESS;Initial Catalog=BaseColaboradores;Integrated Security=True;Pooling=False");
            }
            return oCnx;
        }
    }
}